package indi.yangshenhui.spring.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import indi.yangshenhui.spring.dao.BaseDao;
import indi.yangshenhui.spring.dao.StudentDao;
import indi.yangshenhui.spring.pojo.StudentPojo;

@Repository
public class StudentDaoImpl extends BaseDao<StudentPojo> implements StudentDao {

	public List<StudentPojo> query(String[] params, int first, int max) {
		List<StudentPojo> list = queryList(
				"SELECT s_id as id,s_name as name,s_age as age,s_birthday as birthday FROM student limit ?,?",
				new Object[] { first, max });
		return list;
	}

	@Override
	public Class<StudentPojo> getPojoClass() {
		return StudentPojo.class;
	}

}